package com.wmx.singleton;

/**********************************
 * @author wmx
 * @date 2019/8/15 9:18
 * @description:
 * @version 1.0
 * 根据类的加载实现单例
 * 静态内部类，只有在使用的时候在加载。
 ************************************/
public class SingletonInstance {

    private SingletonInstance() {
    }

    ;

    private static class HandleInstance {
        private static SingletonInstance INSTANCE = new SingletonInstance();
    }

    public static SingletonInstance getInstance() {
        return HandleInstance.INSTANCE;
    }
}
